﻿using BaseSimpleAPI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Text;
using System.Threading.Tasks;

namespace UDPHelper
{
    public class UDPContext
    {
        /// <summary>
        /// 当前对象
        /// </summary>
        public static UDPContext Current { get { return (UDPContext)CallContext.HostContext; } }

        /// <summary>
        /// 设置上下文
        /// </summary>
        /// <param name="context"></param>
        public static void SetCurrent(UDPContext context)
        {
            CallContext.HostContext = context;
        }
        
        /// <summary>
        /// UDP请求包
        /// </summary>
        public UDPPackage RequestUDPPackage { get; set; }
    }
}
